# Contributor: Rasmus Thomsen <oss@cogitri.dev>
# Maintainer: Rasmus Thomsen <oss@cogitri.dev>
pkgname=libmanette
pkgver=0.2.4
pkgrel=1
pkgdesc="Simple GObject game controller library"
url="https://gitlab.gnome.org/aplazas/libmanette"
arch="all"
license="LGPL-2.1-or-later"
makedepends="meson glib-dev libgudev-dev libevdev-dev gobject-introspection-dev
	vala"
subpackages="$pkgname-dev"
source="https://download.gnome.org/sources/libmanette/${pkgver%.*}/libmanette-$pkgver.tar.xz
	time64.patch"

build() {
	meson \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var \
		--buildtype=plain \
		-Dvapi=true \
		-Dintrospection=true \
		. output
	ninja -C output
}

check() {
	ninja -C output test
}

package() {
	DESTDIR="$pkgdir" ninja -C output install
}

sha512sums="713686e3fd515a09846def3283a9e687571dfe47357af00f95739b6e888a454ab14c526a11b38c4ad19bdf928fc3b13b8be32612557dd0ecc743efd2cb6e0792  libmanette-0.2.4.tar.xz
e82a3ebcc04842e419dfd2d76e3c7deed6bdc1d4efca0c039b45b5cbbba3d73e9744b0150d538f86cc47d9aa6eb5f373876d9a5a086d1bb030771eb5fe518c8e  time64.patch"
